<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    request.setCharacterEncoding("UTF-8");
    String htmlData = request.getParameter("content1") != null ? request.getParameter("content1") : "";
%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    <script type="text/javascript" src="<%=path%>/My97DatePicker/WdatePicker.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=path%>/CSS/backLayout.css">
</head>
<style>
    .div_input {
        width: 500px;
        height: 40px;
    }
</style>
<body style="background: #f5f5f5">
<div class="main">
    <div class="weizhi">
        基础资料>>人力基础资料>>职级职等>>新增
    </div>
    <div class="div_body" style="box-shadow: 0 0 5px #cccccc;">
        <div class="div_form">
            <form action="<%=path%>/DrivingSys/addPositiongrade.html" class="form"  onsubmit=" return subForm()">
                <div class="fwrz">
                    <div class="div_input">
                        <span class="gn_name">驾校&nbsp;:&nbsp;</span>
                        <input type="text" readonly="readonly" name="fcontrolunitid" value="${department_positiongrade.fnameL2}" style="color: gray;">
                    </div>
                    <div class="div_input">
                        <span class="gn_name">编码&nbsp;:&nbsp;</span>
                        <input type="text" name="fnumber"  value="${fnumber}" style="color: gray;">
                    </div>
                    <div class="div_input">
                        <span class="gn_name">名称&nbsp;:&nbsp;</span>
                        <input type="text" name="fnameL2" class="fnameL2" style="color: gray;"> &nbsp;<span><font color="red">必填</font></span>
                    </div>
                    <div class="div_input">
                        <span class="gn_name">简称&nbsp;:&nbsp;</span>
                        <input type="text" name="fsimplename">
                    </div>
                    <div class="div_input">
                        <span class="gn_name">描述&nbsp;:&nbsp;</span>
                        <input type="text" name="fdescriptionL2" id="gs">
                    </div>
                    <div class="div_tj" style="margin-left: 140px">
                        <div>
                            <input type="submit" class="input_submit bc" value="" style="margin-right: 30px;"/>
                        </div>
                        <div>
                            <input type="button" class="input_back fh" value="" onclick="back()"/>
                        </div>
                    </div>
            </form>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="<%=path%>/JQuery/jquery-1.8.2.js"></script>
<%@ include file="/WEB-INF/JSP/ajax.jsp" %>
<script type="text/javascript">
    $(document).ready(function () {
        var type = "${type}";
        if (type == "1") {
            //alert("添加成功!");
            editAlert();
        }
    })

    function back(){
        location="<%=path%>/DrivingSys/selectPositiongrade.html/look.action";
    }
    function subForm() {
        var fnameL2 =$('.fnameL2').val();
        if(fnameL2 == null || fnameL2 == ''){
            alert("名称不能为空!")
            return false;
        }
    }
</script>
</html>